home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / aio_write.z / aio_write
Encoding:
Text File  |  2002-10-03  |  11.9 KB  |  199 lines

  1.  
  2.  
  3.  
  4. AAAAIIIIOOOO____WWWWRRRRIIIITTTTEEEE((((3333))))                                                      AAAAIIIIOOOO____WWWWRRRRIIIITTTTEEEE((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      aio_write, aio_write64 - asynchronous I/O write
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<aaaaiiiioooo....hhhh>>>>
  13.  
  14.      iiiinnnntttt aaaaiiiioooo____wwwwrrrriiiitttteeee((((aaaaiiiiooooccccbbbb____tttt ****aaaaiiiiooooccccbbbbpppp))));;;;
  15.  
  16.      iiiinnnntttt aaaaiiiioooo____wwwwrrrriiiitttteeee66664444((((aaaaiiiiooooccccbbbb66664444____tttt ****aaaaiiiiooooccccbbbbpppp))));;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      The _aaaa_iiii_oooo______wwww_rrrr_iiii_tttt_eeee_((((_)))) function allows the calling process to write aaaaiiiiooooccccbbbbpppp----
  20.      >>>>aaaaiiiioooo____nnnnbbbbyyyytttteeeessss from the file associated with aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____ffffiiiillllddddeeeessss into the
  21.      buffer pointed to by aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____bbbbuuuuffff (see wwwwrrrriiiitttteeee((((2222))))).  The function call
  22.      returns when the write request has been initiated or, at a minimum,
  23.      queued for the file or device.
  24.  
  25.      The aaaaiiiiooooccccbbbb---->>>>aaaaiiiioooo____ssssiiiiggggeeeevvvveeeennnntttt defines how the calling process will be notified
  26.      upon I/O completion.
  27.  
  28.      If ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy is SSSSIIIIGGGGEEEEVVVV____NNNNOOOONNNNEEEE, then no notification will be posted to the
  29.      calling application.
  30.  
  31.      If ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy is SSSSIIIIGGGGEEEEVVVV____SSSSIIIIGGGGNNNNAAAALLLL, then the signal specified in ssssiiiiggggeeeevvvv____ssssiiiiggggnnnnoooo
  32.      will be sent to the calling process. If SSSSAAAA____SSSSIIIIGGGGIIIINNNNFFFFOOOO is set for the signal
  33.      (see ssssiiiiggggaaaaccccttttiiiioooonnnn((((2222))))) and the signal is in the range of SSSSIIIIGGGGRRRRTTTTMMMMIIIINNNN and
  34.      SSSSIIIIGGGGRRRRTTTTMMMMAAAAXXXX then the signal will be queued to the process and the value in
  35.      ssssiiiiggggeeeevvvv____vvvvaaaalllluuuueeee will be the ssssiiii____vvvvaaaalllluuuueeee in the generated signal.
  36.  
  37.      If ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy is SSSSIIIIGGGGEEEEVVVV____CCCCAAAALLLLLLLLBBBBAAAACCCCKKKK then the function ssssiiiiggggeeeevvvv____ffffuuuunnnncccc will be
  38.      called with ssssiiiiggggeeeevvvv____vvvvaaaalllluuuueeee as the argument. Only one callback will be called
  39.      at a time, however programs should be careful to note that a callback may
  40.      be run in parallel with the calling process.
  41.  
  42.      If ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy is SSSSIIIIGGGGEEEEVVVV____TTTTHHHHRRRREEEEAAAADDDD then the function ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy____ffffuuuunnnnccccttttiiiioooonnnn
  43.      will be called by a new thread (see pppptttthhhhrrrreeeeaaaaddddssss((((5555))))) with ssssiiiiggggeeeevvvv____vvvvaaaalllluuuueeee as the
  44.      argument.  This thread is created when the event arrives with the
  45.      attributes specified in ssssiiiiggggeeeevvvv____nnnnoooottttiiiiffffyyyy____aaaattttttttrrrriiiibbbbuuuutttteeeessss except that it is
  46.      automatically detached.  The calling process should ensure there are
  47.      sufficient resources to create the thread.
  48.  
  49.      All aaaaiiiioooo____wwwwrrrriiiitttteeee(((()))) calls must supply a complete aaaaiiiiooooccccbbbb---->>>>aaaaiiiioooo____ssssiiiiggggeeeevvvveeeennnntttt
  50.      structure.
  51.  
  52.      The aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____lllliiiioooo____ooooppppccccooooddddeeee field is ignored by aaaaiiiioooo____wwwwrrrriiiitttteeee(((()))).
  53.  
  54.      Prioritized I/O is not currently supported among asynchronous file
  55.      operations.  aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____rrrreeeeqqqqpppprrrriiiioooo must be set to 0, otherwise the call
  56.      will fail.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. AAAAIIIIOOOO____WWWWRRRRIIIITTTTEEEE((((3333))))                                                      AAAAIIIIOOOO____WWWWRRRRIIIITTTTEEEE((((3333))))
  71.  
  72.  
  73.  
  74.      The I/O requests submitted in an unspecified order unless the file was
  75.      opened with the OOOO____AAAAPPPPPPPPEEEENNNNDDDD in which case the write operations will happen
  76.      in the order that they were submitted.
  77.  
  78.      After a call to aaaaiiiioooo____wwwwrrrriiiitttteeee the aaaaiiiiooooccccbbbbpppp may be used as an argument to
  79.      aaaaiiiioooo____eeeerrrrrrrroooorrrr(((()))) and aaaaiiiioooo____rrrreeeettttuuuurrrrnnnn(((()))) in order to determine the error status and
  80.      return status, respectively, of the asynchronous operation while it is
  81.      proceeding. If an error condition is encountered during queueing, the
  82.      function call returns without having initiated or queued the request.
  83.      After a successful call to enqueue an asynchronous I/O operation, the
  84.      value of the file offset for the file is undefined.
  85.  
  86.      If the buffer pointed to by aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____bbbbuuuuffff or the control block pointed
  87.      to by aaaaiiiiooooccccbbbbpppp changes or becomes an illegal address prior to asynchronous
  88.      I/O completion then the behavior is undefined.  Simultaneous asynchronous
  89.      operations using the same aaaaiiiiooooccccbbbbpppp produce undefined results.
  90.  
  91.      For any system action that changes the process memory space while an
  92.      asynchronous I/O is outstanding to the address range being changed, the
  93.      result of that asynchronous I/O is undefined.
  94.  
  95.      The aaaaiiiioooo____wwwwrrrriiiitttteeee66664444() function is identical to aaaaiiiioooo____wwwwrrrriiiitttteeee(((()))) except that it
  96.      takes an aaaaiiiiooooccccbbbb66664444____tttt * (see <aaaaiiiioooo....hhhh>).  This structure allows for the
  97.      specification of a file offset greater than 2 Gigabytes.
  98.  
  99.  
  100. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  101.      aio_read(3), lio_listio(3), aio_error(3), aio_return(3), aio_hold(3),
  102.      aio_cancel(3), aio_sgi_init(3), aio_fsync(3), write(2), lseek(2),
  103.      close(2), _exit(2), exec(2), fork(2), pthreads(5), sysconf(3C).
  104.  
  105. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  106.      The aaaaiiiioooo____wwwwrrrriiiitttteeee(((()))) returns the value 0 to the calling process if the I/O
  107.      operation is successfully queued; otherwise, the function shall return
  108.      the value -1 and shall set _e_r_r_n_o to indicate the error.
  109.  
  110.      [EAGAIN]       The requested asynchronous I/O operation was not queued
  111.                     due to system resource limitations. Often this is due to
  112.                     exceeding the maximum number of asynchronous I/O
  113.                     operations for the system. The maximum can be checked with
  114.                     a call to _s_y_s_c_o_n_f() with an argument of ____SSSSCCCC____AAAAIIIIOOOO____MMMMAAAAXXXX....
  115.  
  116.      Each of the following conditions may be detected synchronously at the
  117.      time of the call to aaaaiiiioooo____wwwwrrrriiiitttteeee(((()))) , or asynchronously. If any of the
  118.      conditions below are detected synchronously at the time of the call, the
  119.      aaaaiiiioooo____wwwwrrrriiiitttteeee(((()))) function shall return -1 and set _e_r_r_n_o to the corresponding
  120.      value. If any of the conditions below are detected asynchronously, the
  121.      return status of the asynchronous operation shall be set to -1 and the
  122.      error status of the asynchronous operation shall be set to the
  123.      corresponding value.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. AAAAIIIIOOOO____WWWWRRRRIIIITTTTEEEE((((3333))))                                                      AAAAIIIIOOOO____WWWWRRRRIIIITTTTEEEE((((3333))))
  137.  
  138.  
  139.  
  140.      [EBADF]        The aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____ffffiiiillllddddeeeessss argument is not a valid file
  141.                     descriptor open for writing.
  142.  
  143.      [EINVAL]       The file offset value implied by aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____ooooffffffffsssseeeetttt would
  144.                     be invalid, aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____rrrreeeeqqqqpppprrrriiiioooo is not a valid value, or
  145.                     aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____nnnnbbbbyyyytttteeeessss is an invalid value.
  146.  
  147.      In the case that the aaaaiiiioooo____wwwwrrrriiiitttteeee(((()))) successfully queues the I/O operation,
  148.      the return status of the asynchronous operation shall be one of the
  149.      values normally returned by the _w_r_i_t_e(_2) function call. If the operation
  150.      is successfully queued, but is subsequently canceled or encounters an
  151.      error, the error status for the asynchronous operation shall contain one
  152.      of the values normally set by the _w_r_i_t_e(_2) function call, or one of the
  153.      following:
  154.  
  155.      [EBADF]        The aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____ffffiiiillllddddeeeessss argument is not a valid file
  156.                     descriptor open for writing.
  157.  
  158.      [EINVAL]       The file offset value implied by aaaaiiiiooooccccbbbbpppp---->>>>aaaaiiiioooo____ooooffffffffsssseeeetttt would
  159.                     be invalid.
  160.  
  161.      [ECANCELED]    The requested I/O was canceled before the I/O completed
  162.                     due to an explicit aaaaiiiioooo____ccccaaaannnncccceeeellll((((3333)))) request.
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.